home *** CD-ROM | disk | FTP | other *** search
- Path: freenet3.freenet.ufl.edu!afn03257
- From: afn03257@freenet3.freenet.ufl.edu (Daniel P Hudson)
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Re: Clearing the keyboard buffer
- Followup-To: alt.msdos.programmer
- Date: 27 Jan 1996 04:05:57 GMT
- Message-ID: <4ec8b5$1fm@huron.eel.ufl.edu>
- References: <4dtqi4$60u@cdc2.cdc.net>,<4e07uh$oqq@huron.eel.ufl.edu>
- <DLt4p1.37x@news.cern.ch>
- NNTP-Posting-Host: freenet3.afn.org
- X-Newsreader: wsOMR/SOUP v1.00 [NR]
-
- In article <DLt4p1.37x@news.cern.ch>,
- loreti@mxsld2.pd.infn.it (Maurizio Loreti) wrote:
-
- > I'm using Turbo C++ v. 3.1 and I need to be able to clear the
- > keyboard BTW, this following bit of code wouldn't work :
-
- > > > while(kbhit()) getch();
-
- > > > Because I want the user to be able to just keep pushing the same key,
- > > > making the above loop infinitly. If I don't clear the keyboard
-
- > > Huh? Once the buffer is caught up, it shouldn't continue, but you
- > > might want to try fflush(stdin);
-
- > Bullshit. Read the FAQ list to learn why this is an error;
- > specifically Q/A 12.26:
-
- I'm not posting from c.l.c, and I flat out don't care what the
- anal-retentive ANSI-C users say. He posted this to alt.msdos.programmer
- where I answered it. If you'd take 2 seconds to read his original code
- you'd notice ANSI is not on his list of do's. getch()? kbhit()?
- Several DOS C compilers support fflush(stdin); and have for some time now.
- Sorry for going off half-cocked, but I've already recieved 3 extremely
- rude e-mail's about this, and now I've got 2 or 3 listed in
- alt.msdos.programmer, from users who apparently can't handle the
- fact my answer works in his situation, in a.m.p, ANSI C in not the only
- thing permitted and we kind of like it that way, so please try
- and check the header's before you rant off to users who really don't care
- what your precious FAQs or documents say.
-
- Had I of realized he was cross-posting this at the time I would have
- trimmed the header to prevent such egocentric rantings.
-
- This reply was posted to c.l.c and c.l.c++ to clear up the issue.
- Replies have been re-directed to a.m.p, everyone else should just drop it,
- your creating 10X the wasted bandwidth by ranting that I did by
- forgetting to simply check my header anyway.
-
- BTW, my reply to Craig, should anyone care about typematic delays, has
- had the header trimmed to alt.msdos.programmer only. Thank You.
-